import request from "@/utils/request";

export function getPermissionListApi() {
  return request({
    url: "/sys/permission",
    method: "get",
  });
}

// 新增权限标识
export function addPermissionApi(data) {
  return request({
    url: "/sys/permission",
    method: "post",
    data,
  });
}

// 删除权限点
export function delPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: "delete",
  });
}

// 获取权限点详情
export function detaPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: "get",
  });
}

// 修改权限点
export function editPermissionApi(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: "put",
    data,
  });
}
